<?php

class Db_Tables2_BLogsContractApproval
{	
	function __construct() {
		$this->dealers_db = Zend_Registry::get("dealers_db");
	}
	
	function AddRecord($contract_id, $emp_id, $emp_name, $act_type, $tips=NULL)
	{
		$set = array(
			"contract_id" => $contract_id,
			"emp_id" => $emp_id,
			"emp_name" => $emp_name,
			"act_type" => $act_type,
			"ctime" => date("Y-m-d H:i:s")
		);
		
		if($tips)
		{
			$set['tips'] = $tips;
		}
		
		$this->dealers_db->insert("b_logs_contract_approval", $set);
		
		return TRUE;
	}
}